package cn.school.iot.eneity;

import lombok.Data;

@Data
public class CfgTimeSection {
    public int dwRecordMask;//录像掩码，按位分别为动态检测录像、报警录像、定时录像、Bit3~Bit15保留、Bit16动态检测抓图、Bit17报警抓图、Bit18定时抓图
    // 当表示推送时间段时, 表示使能：1表示使能，0表示非使能
    public int nBeginHour;
    public int nBeginMin;
    public int nBeginSec;
    public int nEndHour;
    public int nEndMin;
    public int nEndSec;

    public void setStartTime(int nBeginHour, int nBeginMin, int nBeginSec) {
        this.nBeginHour = nBeginHour;
        this.nBeginMin = nBeginMin;
        this.nBeginSec = nBeginSec;
    }

    public void setEndTime(int nEndHour, int nEndMin, int nEndSec) {
        this.nEndHour = nEndHour;
        this.nEndMin = nEndMin;
        this.nEndSec = nEndSec;
    }

    public String startTime() {
        return nBeginHour + ":" + nBeginMin + ":" + nBeginSec;
    }

    public String endTime() {
        return nEndHour + ":" + nEndMin + ":" + nEndSec;
    }
}
